package a.oschina.observedemo.demo3;


/**
 * &lt;功能详细描述&gt;
 *
 * @author Administrator
 * @version [版本号, 2018/10/23]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class StockObserver extends Observer {
    private String name;
    private Secretary sub;

    public StockObserver(String name, Subject sub) {
        super(name, sub);
        this.name = name;
        this.sub = (Secretary) sub;
    }

    @Override
    public void update() {
        System.out.println(sub.getAction() + name+"继续工作");
    }
}
